home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / fs / time.c.D < prev    next >
Text File  |  1990-07-25  |  2KB  |  75 lines

  1. *** /tmp/,RCSt1022262    Wed Jul 25 13:49:09 1990
  2. --- time.c    Mon Jul 23 11:34:27 1990
  3. ***************
  4. *** 8,21 ****
  5.    */
  6.   
  7. ! #include "../h/const.h"
  8. ! #include "../h/type.h"
  9. ! #include "../h/callnr.h"
  10. ! #include "../h/com.h"
  11. ! #include "../h/error.h"
  12. ! #include "const.h"
  13. ! #include "type.h"
  14.   #include "file.h"
  15.   #include "fproc.h"
  16. - #include "glo.h"
  17.   #include "inode.h"
  18.   #include "param.h"
  19. --- 8,16 ----
  20.    */
  21.   
  22. ! #include "fs.h"
  23. ! #include <minix/callnr.h>
  24. ! #include <minix/com.h>
  25.   #include "file.h"
  26.   #include "fproc.h"
  27.   #include "inode.h"
  28.   #include "param.h"
  29. ***************
  30. *** 32,36 ****
  31.     register struct inode *rip;
  32.     register int r;
  33. -   extern struct inode *eat_path();
  34.   
  35.     /* Temporarily open the file. */
  36. --- 27,30 ----
  37. ***************
  38. *** 41,46 ****
  39.     r = OK;
  40.     if (rip->i_uid != fp->fp_effuid && !super_user) r = EPERM;
  41.     if (r == OK) {
  42. !     rip->i_modtime = update_time;
  43.       rip->i_dirt = DIRTY;
  44.     }
  45. --- 35,41 ----
  46.     r = OK;
  47.     if (rip->i_uid != fp->fp_effuid && !super_user) r = EPERM;
  48. +   if (read_only(rip) != OK) r = EROFS;    /* not even su can touch if R/O */
  49.     if (r == OK) {
  50. !     rip->i_mtime = updated_time;
  51.       rip->i_dirt = DIRTY;
  52.     }
  53. ***************
  54. *** 59,64 ****
  55.   /* Perform the time(tp) system call. */
  56.   
  57. -   extern real_time clock_time();
  58.     reply_l1 = clock_time();    /* return time in seconds */
  59.     return(OK);
  60. --- 54,57 ----
  61. ***************
  62. *** 90,94 ****
  63.   /* Perform the times(buffer) system call. */
  64.   
  65. !   real_time t[4];
  66.   
  67.     sys_times(who, t);
  68. --- 83,87 ----
  69.   /* Perform the times(buffer) system call. */
  70.   
  71. !   time_t t[4];
  72.   
  73.     sys_times(who, t);
  74.